<?php

namespace app\admin\model;

use think\Model;

class Banner extends Model
{
    protected static function init()
    {
        self::afterDelete(function ($data) {
            $url=ROOT_PATH."public\\".$data['pic'];
            if (file_exists($url)) {
               @unlink($url);
            }
        });
    }
}
